﻿using APP.IO;
using APP.OpenCV;
using MinesweeperAutoScanDemo.Model;
using ScreenCapture;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using Tools.OCR.Tesseract;

namespace MinesweeperAutoScanDemo
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
        }


        private void SetNUM_Click(object sender, RoutedEventArgs e)
        {
            var button = sender as MenuItem;
            var text = button.Tag.ToString();
            var modObj = button.DataContext as EarthModel;
            modObj.BomboNumber = int.Parse(text);
            modObj.Status = Enums.EathStatus.Open;
        }

        private void SetStatus_Click(object sender, RoutedEventArgs e)
        {
            var button = sender as MenuItem;
            var text = button.Tag.ToString();
            var modObj = button.DataContext as EarthModel;
            modObj.Status = (Enums.EathStatus)int.Parse(text);
        }
    }
}
